

<style>


#container {
	width:470px;
	padding:0px;
	margin:0 auto;
	position:relative;
	z-index:0;
}




/*
	Slideshow
*/

#slides {
	position:absolute;
	top:15px;
	left:4px;
	z-index:100;
}

/*
	Slides container
	Important:
	Set the width of your slides container
	Set to display none, prevents content flash
*/

.slides_container {
	width:470px;
	overflow:hidden;
	position:relative;
	display:none;
}

/*
	Each slide
	Important:
	Set the width of your slides
	If height not specified height will be set by the slide content
	Set to display block
*/

.slides_container a {
	width:470px;
	height:270px;
	display:block;
}

.slides_container a img {
	display:block;
}


/*
	Pagination
*/

.pagination {
	margin:26px auto 0;
	width:100%;
	
}

.pagination li {
	float:right;
	margin:0 1px;
	list-style:none;
	
}


.pagination li.current a {
	background-position:0 -12px;
}



/*
	Anchors
*/


.caption{
position:relative;
background-color: black;
moz-opacity:0.7;
opacity: 0.7; 
filter:alpha(opacity=70);
color:white;
font-size: 18px;
direction: rtl;
padding:10px;
}

</style>

	<script>
	$(function(){
		$('#slides').slides({
			preload: true,
			preloadImage: '/images/loading.gif',
			play: 5000,
			pause: 2500,
			hoverPause: true,
			animationStart: function(current){
				$('.caption').animate({
					bottom:-35
				},100);
				if (window.console && console.log) {
					// example return of current slide number
					console.log('animationStart on slide: ', current);
				};
			},
			animationComplete: function(current){
				$('.caption').animate({
					bottom:-60
				},200);
				if (window.console && console.log) {
					// example return of current slide number
					console.log('animationComplete on slide: ', current);
				};
			},
			slidesLoaded: function() {
				$('.caption').animate({
					top:-106
				},200);
			}
		});
	});
	</script>
	<?php 

include_once('/php/simplehtmldom/simple_html_dom.php');

$url='http://www.hibasport.com//';
// Create DOM from URL or file
$html = file_get_html($url);
/*
// Find all images
foreach($html->find('div') as $element)
       echo "<img src=\"".$url.$element->src."\">" . '<br>';
*/
/*
// Find all links
foreach($html->find('a') as $element)
       echo $element->href . '<br>'; 
*/

?>

<div id="container">

<div id="slides">
<div class="slides_container" dir="ltr">
<?php 
$div=$html->find('div[id=slider1]', 0);
foreach($div->find('div[class=contentdiv]') as $element)
	{ 
		foreach($element->find('img') as $subelement)
			{	
			$title=iconv("windows-1256", "UTF-8", $subelement->alt);
		//	echo $title."<br/>"; 
			$id=$subelement->parent()->href;
			$id = explode("details-", $id);
			$id = explode(".html", $id[1]);
			$id = $id[0];
		//	echo $id."<br/>"; 
			$image=$url.$subelement->src;
			$description=iconv("windows-1256", "UTF-8", $subelement->parent()->parent()->next_sibling ()->next_sibling ()->find('font', 0)->childNodes(0)->innertext);
			$description = explode("<a", $description);
			$description = explode("<br>", $description[0]);
			$description = $description[1];
		//	echo $description."<br/>"; ?>
		<a href="#" title="<?php echo $title; ?>" target="_blank"><img src="<?php echo $image; ?>" width="470" height="313" alt="<?php echo $title; ?>">
		<div class="caption" >
		<p><?php echo $title; ?></p>
								</div>
		</a>

			
		
				
	
			<?php 
			}
	}
?>
	

				
			
						</div>
				
			</div>
	
		</div>